<template>
  <div>
    <button @click="isShow = !isShow">显示/隐藏</button>
    <transition
      name="animate__animated animate__bounce"
      :appear="true"
      enter-active-class="animate__backInDown"
      leave-active-class="animate__hinge"
    >
      <h1 v-show="isShow" key="1">你好呀!!!</h1>
    </transition>
  </div>
</template>

<script>
import "animate.css"; //引入的是样式，不是js文件
export default {
  name: "TestAnimate",
  data() {
    return {
      isShow: true,
    };
  },
};
</script>

<style scoped>
h1 {
  background-color: coral;
}
</style>